function initManual() {
    var url = GetUrlRelativePath();
    console.log(url);
    if($.common.isNotEmpty(url)){
        // 展示使用手册
        var sysc =
            '<button flag=0 class="btn btn-default btn-outline dropdown-toggle" id="syscan" title="使用帮助" type="button">' +
            '<i class="glyphicon glyphicon glyphicon-info-sign"></i>  ' +
            '<span class="caret"></span>' +
            '</button>' +
            '<ul class="dropdown-menu" id="wdsp">' +
            '<li id="wd"><a href="#"><i class="fa fa-book"></i>使用手册下载</a></li>' +
            '<li id="sp"><a href="#"><i class="fa fa-video-camera"></i>使用视频下载</a></li>' +
            '</ul>' +
            "";
        $(".columns").append(sysc);

        // 通过菜单路径判断是否上传手册并获取信息
        $.ajax({
            type:"post",
            url: ctx + "common/selectManualByUrl",
            async: false,
            data:{
                url: url,
            },
            success: function(result) {
                if ($.common.isNotEmpty(result) && result.manual != undefined && result.manual.documentPath != undefined) {
                    $("#wd").attr("Aid", result.manual.document);
                    $("#wd").attr("Name", result.manual.documentName);
                }
                if ($.common.isNotEmpty(result) && result.manual != undefined && result.manual.videoPath != undefined) {
                    $("#sp").attr("Aid", result.manual.video);
                    $("#sp").attr("Name", result.manual.videoName);
                }
                var pathwd = $("#wd").attr("Aid");
                var pathsp = $("#sp").attr("Aid");
                if (pathwd == undefined && pathsp == undefined) {
                    $("#syscan").remove();
                    $("#wdsp").remove();
                } else {
                    if (pathwd != undefined) {
                        $("#wd").show();
                    } else {
                        $("#wd").hide();
                    }

                    if (pathsp != undefined) {
                        $("#sp").show();
                    } else {
                        $("#sp").hide();
                    }
                }
            }
        });

        // 判断显示还是隐藏下拉选项
        $("#syscan").click(function(){
            if($("#syscan").attr("flag") == 0){
                $("#syscan").next(".dropdown-menu").css("display", "block");
                $("#syscan").attr("flag",1);
            }else{
                $("#syscan").next(".dropdown-menu").css("display", "none");
                $("#syscan").attr("flag",0);
            }
        });

        $("#wd").click(function(){
            $.modal.confirm("确定下载使用手册吗？",function () {
                downloadFile($("#wd").attr("Aid"), $("#wd").attr("Name"));
            })
        });
        $("#sp").click(function(){
            $.modal.confirm("确定下载使用视频吗？",function () {
                downloadFile($("#sp").attr("Aid"), $("#sp").attr("Name"));
            })
        });
    }
}

/** 获取当前菜单url */
function GetUrlRelativePath()
{
    var url = document.location.toString();
    var arrUrl = url.split("//");

    var start = arrUrl[1].indexOf("/");
    var relUrl = arrUrl[1].substring(start);//stop省略，截取从start开始到结尾的所有字符

    if(relUrl.indexOf("?") != -1){
        relUrl = relUrl.split("?")[0];
    }
    return relUrl;
}